!function(){"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=e(window.template_manager.config.shift());function i(n,e){var t,i=Object.keys(n);return Object.getOwnPropertySymbols&&(t=Object.getOwnPropertySymbols(n),e&&(t=t.filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),i.push.apply(i,t)),i}function l(n){for(var e=1;ee.length)&&(n=e.length);for(var t=0,i=new Array(n);tt.maxBidTime&&(function(e){throw new TypeError('"'+e+'" is read-only')}("tmp"),console.log("APS Bid too old")),console.log("Returned APS bid result: "+e),e},this.handleVideoBids=function(e,n){console.log("Handle APS bids"),console.log(e),t.lastBidTime=t.performance.now();t.lastBidParams=e.filter(function(e){return"video"===e.mediaType}).map(function(t){return Object.keys(t.targeting).reduce(function(e,n){return void 0===t.targeting[n]?e:e+"&"+n+"="+t.targeting[n]},"")}).join(""),t.lastBidParams=encodeURIComponent(t.lastBidParams),n&&n()})}function ee(e,i){var o=this,r=e.baseWindow;this.encodedAmp=encodeURIComponent("&"),this.c="",this.g="",this.a="",this.customParams=[],this.additional_cust_params=null===(e=r._gmp)||void 0===e?void 0:e.additional_cust_params,this.aps=i,this.concatCustomParams=function(e,n){return""!==n?""===e?n:e+o.encodedAmp+n:e},this.createCustomParamsObject=function(e,n){return e&&n?{k:e,v:n}:null},this.pushCustomParamsObject=function(e){e&&o.customParams.push(e)},this.pushCustomParams=function(e,n){o.pushCustomParamsObject(o.createCustomParamsObject(e,n))},this.clearCustomParamsObject=function(){o.customParams=[]},this.getPushedCustomParams=function(){for(var e="",n=0;n'),de(''),de('');var le=de('');de('\n \n \n \n ');var ce,ue=de('\n \n \n \n \n \n '),pe={},ge=function(e,n){pe[e]&&pe[e].forEach(function(e){return e(n)})},fe=function(e,n){return pe[e]||(pe[e]=[]),pe[e].push(n),t=e,i=n,{unsubscribe:function(){pe[t]=pe[t].filter(function(e){return e!==i})}};var t,i},me=function(e,n){return new CustomEvent("bb-event-".concat(e),{bubbles:!0,detail:n})},he={title:"",header:"",errorImage:"https://bb1.broadbandy.net/display/assets/not_avaiable.png",borderColor:"#000000",placeholder:"",bigLogo:"./assets/skins-info/sportitaliaLogo.png",borderpx:10,videoContainer:0,headerpx:38,fontSize:13,logoMargin:10,logoPixel:30,logoMarginBottom:0,titleMargin:0,stickyVideoDimensionWidth:20,stickyVideoDimensionHeight:60,stickyVideoDimensionMarginBottom:48,stickyVideoDimensionMarginRight:10,videoCalculationMarginBottom:48,soundBtnPixelTopInVeiw:5,soundBtnPixelTopInVeiwLeft:5,soundBtnPixelTopInSticky:12,soundBtnPixelTopInStickyLeft:5,xBtnPixelTopInSticky:10,xBtnPixelTopInStickyLeft:-5,bottomMarginOfContainer:0,containerAdMargin:10,sizeOfVideoHeight:0,isMobile:(s(E={headerpx:38,logoPixel:30,videoContainer:0,fontSize:13},"logoPixel",30),s(E,"logoMargin",5),s(E,"titleMargin",0),s(E,"marginTopLogo",5),s(E,"videoCalculationMarginBottom",48),s(E,"stickyVideoDimensionWidth",20),s(E,"stickyVideoDimensionHeight",60),s(E,"stickyVideoDimensionMarginBottom",48),s(E,"stickyVideoDimensionMarginRight",50),s(E,"stickyVideoDimensionLeft",15),s(E,"sizeOfVideoHeight",0),s(E,"bottomMarginOfContainer",0),s(E,"soundBtnPixelTopInVeiw",-35),s(E,"soundBtnPixelTopInVeiwLeft",-8),s(E,"soundBtnPixelTopInSticky",14),s(E,"soundBtnPixelTopInStickyLeft",5),s(E,"xBtnPixelTopInSticky",12),s(E,"xBtnPixelTopInStickyLeft",0),s(E,"containerAdMargin",10),E)},be={title:"LBA",header:"",errorImage:"https://bb1.broadbandy.net/display/assets/not_avaiable.png",borderColor:"#69699D",placeholder:"",bigLogo:"./assets/skins-info/lbaLogo.png",borderpx:10,videoContainer:0,headerpx:38,fontSize:13,logoMargin:10,logoPixel:30,logoMarginBottom:0,titleMargin:0,stickyVideoDimensionWidth:20,stickyVideoDimensionHeight:60,stickyVideoDimensionMarginBottom:48,stickyVideoDimensionMarginRight:10,videoCalculationMarginBottom:48,soundBtnPixelTopInVeiw:5,soundBtnPixelTopInVeiwLeft:5,soundBtnPixelTopInSticky:12,soundBtnPixelTopInStickyLeft:5,xBtnPixelTopInSticky:10,xBtnPixelTopInStickyLeft:-5,bottomMarginOfContainer:0,containerAdMargin:10,sizeOfVideoHeight:0,isMobile:(s(de={headerpx:38,logoPixel:30,videoContainer:0,fontSize:13},"logoPixel",30),s(de,"logoMargin",5),s(de,"titleMargin",0),s(de,"marginTopLogo",5),s(de,"videoCalculationMarginBottom",48),s(de,"stickyVideoDimensionWidth",20),s(de,"stickyVideoDimensionHeight",60),s(de,"stickyVideoDimensionMarginBottom",48),s(de,"stickyVideoDimensionMarginRight",50),s(de,"stickyVideoDimensionLeft",15),s(de,"sizeOfVideoHeight",0),s(de,"bottomMarginOfContainer",0),s(de,"soundBtnPixelTopInVeiw",-35),s(de,"soundBtnPixelTopInVeiwLeft",-8),s(de,"soundBtnPixelTopInSticky",14),s(de,"soundBtnPixelTopInStickyLeft",5),s(de,"xBtnPixelTopInSticky",12),s(de,"xBtnPixelTopInStickyLeft",0),s(de,"containerAdMargin",10),de)},ye=(s(E={title:"",header:"",errorImage:"https://bb1.broadbandy.net/display/assets/not_avaiable.png",borderColor:"#000000",placeholder:"",bigLogo:"./assets/skins-info/classLogo.png",borderpx:0,videoContainer:0,logoPixel:42,logoMargin:10,marginTopLogo:0,headerpx:55,fontSize:18,logoMarginBottom:10,titleMargin:25,videoCalculationMarginBottom:48,marginideoContainerReposition:55,stickyVideoDimensionWidth:0,stickyVideoDimensionHeight:0,stickyVideoDimensionMarginRight:0,stickyVideoDimensionMarginBottom:55},"videoCalculationMarginBottom",35),s(E,"bottomMarginOfContainer",0),s(E,"soundBtnPixelTopInVeiw",5),s(E,"soundBtnPixelTopInVeiwLeft",5),s(E,"soundBtnPixelTopInSticky",-21),s(E,"soundBtnPixelTopInStickyLeft",0),s(E,"xBtnPixelTopInSticky",-24),s(E,"xBtnPixelTopInStickyLeft",0),s(E,"containerAdMargin",0),s(E,"sizeOfVideoHeight",0),s(E,"isMobile",(s(de={headerpx:40,logoPixel:22,videoContainer:13,fontSize:13},"logoPixel",35),s(de,"logoMargin",5),s(de,"titleMargin",10),s(de,"marginTopLogo",5),s(de,"videoCalculationMarginBottom",40),s(de,"marginideoContainerReposition",55),s(de,"stickyVideoDimensionWidth",0),s(de,"stickyVideoDimensionHeight",0),s(de,"stickyVideoDimensionMarginRight",0),s(de,"stickyVideoDimensionMarginBottom",55),s(de,"sizeOfVideoHeight",5),s(de,"bottomMarginOfContainer",14.5),s(de,"soundBtnPixelTopInVeiw",-70),s(de,"soundBtnPixelTopInVeiwLeft",-8),s(de,"soundBtnPixelTopInSticky",-21),s(de,"soundBtnPixelTopInStickyLeft",0),s(de,"xBtnPixelTopInSticky",-24),s(de,"xBtnPixelTopInStickyLeft",10),s(de,"containerAdMargin",0),de)),s(E,"isMobileAd",{}),E),ve=(s(de={title:"",header:"",errorImage:"https://bb1.broadbandy.net/display/assets/not_avaiable.png",borderColor:"",placeholder:"",bigLogo:""},"borderColor",""),s(de,"placeholder",""),s(de,"bigLogo",""),s(de,"borderpx",0),s(de,"videoContainer",0),s(de,"headerpx",0),s(de,"fontSize",0),s(de,"logoMargin",0),s(de,"logoPixel",0),s(de,"logoMarginBottom",0),s(de,"titleMargin",0),s(de,"stickyVideoDimensionWidth",0),s(de,"stickyVideoDimensionHeight",0),s(de,"stickyVideoDimensionMarginBottom",0),s(de,"stickyVideoDimensionMarginRight",0),s(de,"videoCalculationMarginBottom",0),s(de,"bottomMarginOfContainer",0),s(de,"containerAdMargin",2),s(de,"sizeOfVideoHeight",0),s(de,"videoCalculationMarginBottom",0),s(de,"soundBtnPixelTopInVeiw",5),s(de,"soundBtnPixelTopInVeiwLeft",5),s(de,"soundBtnPixelTopInSticky",-18),s(de,"soundBtnPixelTopInStickyLeft",2),s(de,"xBtnPixelTopInSticky",-20),s(de,"xBtnPixelTopInStickyLeft",0),s(de,"isMobile",(s(E={headerpx:0,logoPixel:0,videoContainer:0,fontSize:0},"logoPixel",0),s(E,"logoMargin",0),s(E,"titleMargin",0),s(E,"marginTopLogo",0),s(E,"videoCalculationMarginBottom",0),s(E,"marginideoContainerReposition",0),s(E,"stickyVideoDimensionWidth",0),s(E,"stickyVideoDimensionHeight",0),s(E,"stickyVideoDimensionMarginRight",0),s(E,"stickyVideoDimensionMarginBottom",0),s(E,"sizeOfVideoHeight",2),s(E,"bottomMarginOfContainer",0),s(E,"soundBtnPixelTopInVeiw",-70),s(E,"soundBtnPixelTopInVeiwLeft",-8),s(E,"soundBtnPixelTopInSticky",-22),s(E,"soundBtnPixelTopInStickyLeft",0),s(E,"xBtnPixelTopInSticky",-24),s(E,"xBtnPixelTopInStickyLeft",0),E)),de),we=(ce=Object.assign({containerInViewThreshold:0,continueToPlayOutOfTab:!1,actionWhenAdIsNotLoaded:"doNothing",jsonUrl:"",videoUrl:"",jsonPlaylist:"",placeholder:"https://bb1.broadbandy.net/display/assets/lega_placeholder.jpg",logo:"https://bb1.broadbandy.net/display/assets/lega_logo.png",title:"Canale digitale ufficiale Lega Serie A",header:"https://bb1.broadbandy.net/display/assets/highlights_header.png",errorImage:"https://bb1.broadbandy.net/display/assets/not_avaiable.png",adUnitLanner:"",timeBeforeLannerAppears:1,aspectRatio:"landscape",skin:"",onEndVideoPlayAgain:!1,onEndVideoPlayNext:!0,pauseWhenOutOfView:!1,pauseWhenOutOfTab:!1,playOnLoad:!0,pauseAfterFirstAdCompleted:!1,videoFormat:{width:640,height:360},isAudioMute:!0,audioOnHoverAdv:!1,adRepositionConfig:{stickyPosition:"bottomRightCorner",stickyHorizontalMargin:5,stickyVerticalMargin:5,stickyWidth:400,stickyHeight:225,showStickyCloseButton:!0,stickyCloseButtonLoadTimeInSeconds:1,stickyZIndex:2147483647},mobileConfig:{},openAnimation:!1,closeAnimation:1,animationDuration:1,showWhenInView:!1,stayInIframe:!1,amp:!1,cmp:!1,aps:{apsEnabled:!1,networkId:"5055",timeout:3e3,iframe:!0,supplyChain:{enabled:!1,asi:"",sid:"",hp:0}},prebid:{enabled:!1,debug:!1,iframe:!0,timeOut:1300,supplyChain:{enabled:!1,asi:"",sid:"",hp:0},bidders:{pubmatic:{enabled:!1,publisherId:"",adSlot:""},pubmatic_apex:{enabled:!1,publisherId:"",adSlot:""},appnexus:{enabled:!1,member:"0",placement_id:0},criteo:{enabled:!1,zoneId:0,networkId:0},rubicon:{enabled:!1,accountId:0,siteId:0,zoneId:0}}}},n.default),m(ce,"prebid",{}),m(ce.prebid,"enabled",!1),m(ce.prebid,"timeOut",1300),m(ce.prebid,"debug",!1),m(ce.prebid,"iframe",!0),m(ce.prebid,"bidders",{}),m(ce.prebid,"enableSendAllBids",!1),m(ce.prebid.bidders,"appnexus",{}),m(ce.prebid.bidders,"pubmatic",{}),m(ce.prebid.bidders,"pubmatic_apex",{}),m(ce.prebid.bidders,"criteo",{}),m(ce.prebid.bidders,"rubicon",{}),m(ce.prebid.bidders.appnexus,"enabled",!1),m(ce.prebid.bidders.appnexus,"member",""),m(ce.prebid.bidders.appnexus,"placement_id",0),m(ce.prebid.bidders.pubmatic,"enabled",!1),m(ce.prebid.bidders.pubmatic,"publisherId",""),m(ce.prebid.bidders.pubmatic,"adSlot",""),m(ce.prebid.bidders.pubmatic_apex,"enabled",!1),m(ce.prebid.bidders.pubmatic_apex,"publisherId",""),m(ce.prebid.bidders.pubmatic_apex,"adSlot",""),m(ce.prebid.bidders.criteo,"enabled",!1),m(ce.prebid.bidders.criteo,"zoneId",0),m(ce.prebid.bidders.criteo,"networkId",0),m(ce.prebid.bidders.rubicon,"enabled",!1),m(ce.prebid.bidders.rubicon,"accountId",0),m(ce.prebid.bidders.rubicon,"siteId",0),m(ce.prebid.bidders.rubicon,"zoneId",0),m(ce.prebid,"supplyChain",{}),m(ce.prebid.supplyChain,"enabled",!1),m(ce.prebid.supplyChain,"asi",""),m(ce.prebid.supplyChain,"sid",""),m(ce.prebid.supplyChain,"hp",""),m(ce,"aps",{}),m(ce.aps,"apsEnabled",!1),m(ce.aps,"networkId",""),m(ce.aps,"timeout",1300),m(ce.aps,"iframe",!0),m(ce.aps,"supplyChain",{}),m(ce.aps.supplyChain,"enabled",!1),m(ce.aps.supplyChain,"asi",""),m(ce.aps.supplyChain,"sid",""),m(ce.aps.supplyChain,"hp",""),ce);h()&&(we.prebid.iframe=0);var ke=we.amp||C(),E=we,de=E.adRepositionConfig,n=E.adMobileRepositionConfig,Ce=E.headerTitle,xe=ke&&n?n:de,Pe=function(){var t=0t},timeRemaining:function(){return Math.max(0,performance.now()-i+1)}})},1)}),window.cancelIdleCallback||(window.cancelIdleCallback=function(e){clearTimeout(e)}),window.requestAnimationFrame||(window.requestAnimationFrame=function(e){return window.setTimeout(function(){e(Date.now())},1e3/60)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)});var i=[],r=[];e.stayInIframe=e.amp||e.stayInIframe;var a=!!e.stayInIframe||h();e.stayInIframe?(o=window,t=document.currentScript):(t=window.frameElement?function e(n){return n.ownerDocument.defaultView===top?n:e(n.ownerDocument.defaultView.frameElement)}(window.frameElement):document.currentScript,o=t.ownerDocument.defaultView);var n=(a?o:top).document;t.parentElement;var d,A=a?encodeURIComponent(n.referrer):encodeURIComponent(top.location.href),s="";e.amp?((d=n.createElement("script")).src="https://cdn.ampproject.org/amp4ads-v0.js",d.async=!0,n.head.appendChild(d),function(){try{s=window.context.initialConsentValue}catch(e){}}(),n.documentElement.setAttribute("amp4ads","")):"function"!=typeof __tcfapi&&window!==o&&(window.__tcfapi=function(e,n,t,i){"function"!=typeof o.__tcfapi?t({msg:"CMP not found"},!1):o.__tcfapi(e,n,t,i)});return{baseDoc:n,baseWindow:o,srcElement:t,tcData:s,locationHref:A,initWithCmp:function(t){e.cmp&&"function"==typeof o.__tcfapi?(o.__tcfapi("addEventListener",2,function(e,n){!n||"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus||(console.log("CMP","Loaded"),t(),o.__tcfapi("removeEventListener",2,function(e){e&&console.log("CMP","listener removed")},e.listenerId))}),e.cmp=!1):t()},beforeRender:function(e){r.push(e)},onRender:function(e){i.push(e)},render:function(e,n){r.forEach(function(e){return e()}),r=[],i.forEach(function(e){return o.requestIdleCallback(e)}),S(e,t,a),n&&n()}}}(we),Be=Ie.render,Te=Ie.baseWindow;Ie.onRender;var Me,Ee,Le,Ve,De,Oe,_e=Ie.baseDoc,Re=Ie.srcElement,We=(Me=Be,Ee=Te,function(){for(var e=arguments.length,n=new Array(e),t=0;thn(t)?n[0]:n[1]},kn=we.videoFormat,Cn=kn.width,xn=kn.height,Pn="startIma",Sn="showCloseBtn",In="hideCloseBtn",Bn="toggleMuteAudioOnPreroll",Tn="stopReposition",Mn="destroyApp",En="videoPlayerRendered",Ln="videoLoaded",Vn="playerInitialized",Dn="videoPaused",On="playVideo",_n="playVideoWithAd",Rn="tabFocusChange",Wn="videoIntersectionChange",jn="pauseVideoNoAdv",Hn="startVideoObserver",zn="playVideoNoAd",Un="videoIdChanged",Nn="populatePlaylist",Fn="loadNextPlaylistItem",Gn="loadPrevPlaylistItem",qn="changeTitleLink",Qn="onVideoPlayRequestLanner",Xn=xe,Zn=Xn.stickyWidth,de=Xn.stickyHeight,kn=Xn.stickyPosition,Xn=["topCenter","bottomCenter"].includes(kn),kn=Te.outerWidth>Zn;ke&&Xn&&kn?xe.stickyHorizontalMargin=(Te.outerWidth-Zn)/2:ke&&(xe.stickyHorizontalMargin=0);var Yn=n(Cn,xn,!1),Kn=function(e,n,t){var i=3hn(t)?n[0]:n[1]}(Cn,xn,!1),Jn=n(Zn,de,!0,xe.stickyHorizontalMargin),$n=24,et=5;Ce&&(et=0);function nt(e){lt(me(e,{domain:un,adUnit:pn,currentTime:en,videoLength:$e,videoId:qe}))}function tt(e){fn.isAdPlaying||(vn="https://api.broadbandy.net/v1/getVideo/"+(qe=e)+".json",ge(Un))}function it(e,n){return k("div",{id:yt,ref:bt,style:{width:R(0),height:R(0)}})}function ot(e,n){return k(K,{ref:Ct,style:{top:0,left:0,width:R(Yn.width),height:R(Yn.height+st.height+et),backgroundColor:Ze}},k(Tt,null,k(Vt,null),k(Nt,null)),n)}function rt(e,n){return k("div",{style:{width:R(Yn.width-2*$n),height:R(st.height),position:"relative",overflow:"hidden",margin:"0 auto"}},k(xt,null))}function at(){return k("div",{style:{width:R(Yn.width),height:R(st.height),display:"flex",justifyContent:"space-between",alignItems:"center",position:"absolute",backgroundColor:Ze}},k(St,null),k(Pt,null))}var dt,At=(dt=Yn.width)<421?2:dt<501?3:4,st=function(e){e=(e-2*$n-20*(At-1))/At;return{width:e,height:O(e)}}(Yn.width),lt=function(e){return Ue.element.dispatchEvent(e)},ct=function(e,n){return we.pauseWhenOutOfTab&&b("visibilitychange").on(_e).handle(function(){Pe.play()}).handle(function(e){e=e.target.hidden;ge(Rn,!e)}),k("div",null,n)},ut=!0,pt=!0,gt=function(e,n){fe(Rn,function(e){return ut=e}),fe(Wn,function(e){return pt=e});function t(){return fn.isAdPlaying?ge(jn):ut&&pt&&!Te.bb_is_lanner_displaying?(Je=!1,Ke=we.pauseAfterFirstAdCompleted,ge(_n)):(ut&&pt&&Te.bb_is_lanner_displaying&&ge(On),void ge(jn))}return[Rn,Wn].forEach(function(e){return fe(e,t)}),k("div",null,n)},ft=function(e){nt("video-loaded")},mt=function(e){nt("player-initialized")},ht=we.jsonPlaylist,bt=g(),yt=I("div-gpt-ad-",Ie),vt=g(),wt=g(),kt=function(){var i,e=we,t=e.onEndVideoPlayAgain,o=e.onEndVideoPlayNext,n=e.pauseWhenOutOfView,r=!1,a=[];bn({on:"onAdContentPause",handler:function(){return!0}}),bn({on:"onAdCompleted",handler:function(){return!1}}),bn({on:"onAdCompleted",handler:function(){return cn=!1}});var d=we;d.jsonUrl;function A(){vn?fetch(vn).then(function(e){return e.json()}).then(function(e){var n=e.url||s,t=e.image_url||Oe.placeholder;i.dataset.videoId=qe=e.id||0,i.src=n,i.poster=t,i.onloadedmetadata=function(){$e=Math.round(i.duration)},ge(En),c||ge(Vn),ge(Ln),c=!0,Dt=e.page_url||"https://highlights.legaseriea.it",ge(qn)}):(i.src="".concat(s,"#t=0.5"),i.onloadedmetadata=function(){ge(En)})}var s=d.videoUrl,e=d.isAudioMute,l=(l=e)||(null==M?(console.log("late"),!0):M).then(function(e){return e}),d=ze.onCreated,c=!1;d(function(e){n&&fe(Hn,function(){z(e,function(){r&&ge(Wn,!0)},function(){setTimeout(function(){!fn.isAdPlaying&&ut&&(Je=!(r=!0),Ke=we.pauseAfterFirstAdCompleted,ge(Wn,!1))},0)},{threshold:0})})}),d(function(e){(i=e).onerror=function(){i.poster=we.errorImage},ht?fetch(ht).then(function(e){return e.json()}).then(function(e){tt((Ye=e)[0].id),ge(Nn)}):A()}),d(function(e){X.load(e),Z.setUnmuted(l)}),d(function(){var t,i,o;t=ze,i=wt,o=bt,Te.scaleVideo=function(e){var n=+e.scale[1],e=e.animationDuration;x(t).addStyle({width:D("".concat(100*n)),height:D("".concat(100*n)),position:"relative",transition:"width ".concat(e,"s, height ").concat(e,"s, transform ").concat(e,"s")}),n<1?x(i).addStyle({display:"flex",justifyContent:"flex-end"}):setTimeout(function(){x(i).addStyle({display:null,justifyContent:null}),x(t).addStyle({position:null,transition:null}),o.element.firstChild.remove()},1e3*e)}}),d(function(){var e;Fe&&(null!==(e=Te.googletag)&&void 0!==e&&e.apiReady||(e=P("https://securepubads.g.doubleclick.net/tag/js/gpt.js",_e,!0,function(){console.log("Gpt script created")},function(){console.log("Error adding gpt script")}),_e.head.appendChild(e)),ze.element.addEventListener("timeupdate",function(){Math.floor(ze.element.currentTime)!==Ge||Te.bb_lanner_requested||fn.isAdPlaying||cn||Te.bb_player_fullscreen||(Te.bb_lanner_requested=!0,ge(Qn))}))}),d(function(){var n,e;Te.bb_player_fullscreen=!1;if(/iPhone|iPad|iPod/i.test(navigator.userAgent))return ze.element.addEventListener("webkitbeginfullscreen",function(){Te.bb_player_fullscreen=!0},!0),void ze.element.addEventListener("webkitendfullscreen",function(){Te.bb_player_fullscreen=!1},!0);switch(function(e){switch(!0){case-1n+1&&(Ke=u,Je=!1,tt(Ye[n+1].id))):t?(Je=!1,Ke=u,ge(Pn)):(fn.enableAdPlayOnNextPlay(),a.push(Pn))},onPlay:e,onPause:function(e){4==ze.element.readyState&&(gn=!0,ge(Dn))},onVolumeChange:function(e){var n=e.target,e=n.volume,n=n.muted;Pe.setAdvVolume(e=n?0:e)},controls:!0,disablePictureInPicture:!0,controlslist:"nodownload noremoteplayback noplaybackrate",muted:!0,ref:ze,poster:Oe.placeholder,preload:"metadata",style:{width:D(100),height:D(100)}}))),!ht?(st.height=0,!1):k("div",null,k(at,null),k(rt,null)))},Ct=g(),xt=function(e,n){var l,c=g();return fe(Nn,function(){Ye.map(function(e){var n=k("li",null);n.id=e.id,n.onclick=function(){gn||ge(Dn),gn=!0,tt(e.id)};var t=e.thumbnail_url;x({element:n}).addStyle({backgroundImage:"url(".concat(t,")"),backgroundPosition:"center",backgroundSize:"cover",minWidth:R(st.width),height:R(st.height),marginRight:R(20),display:"flex",cursor:"pointer",overflow:"hidden"}),x(c).addChild(n);var i=k("div",null);i.id="bb-item-title",x({element:i}).addStyle({backgroundColor:"rgba(0,0,0,0.5)",width:D(100),height:D(30),color:"white",fontSize:R(12),whiteSpace:"nowrap",marginTop:"auto",paddingLeft:R(3),transform:"translateX(0)",lineHeight:"1.8",fontWeight:"bold"}),i.innerText=e.title,i.onmouseenter=function(){x({element:i}).addStyle({width:"auto",transform:"translateX(calc(".concat(st.width,"px - 100%))"),transition:"2s",transitionTimingFunction:"linear"})},i.onmouseleave=function(){x({element:i}).addStyle({width:"auto",transform:"translateX(0)",transition:"0.2s"})},Yn.width<502&&x({element:i}).addStyle({overflow:"hidden",textOverflow:"ellipsis",lineHeight:"2"}),x({element:n}).addChild(i),l=Ye.length});var i=c.element,e=i.offsetWidth,o=0,r=-(l/At*e+l/At*20-e-20);i.addEventListener("touchstart",function(e){a=e.touches[0].clientX,d=e.touches[0].clientY},!1),i.addEventListener("touchmove",function(e){var n,t;null!==a&&null!==d&&(n=e.touches[0].clientX,t=e.touches[0].clientY,n=a-n,t=d-t,Math.abs(n)>Math.abs(t)&&(0